import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-stars',
  templateUrl: './stars.component.html',
  styleUrls: ['./stars.component.less']
})
export class StarsComponent implements OnInit {
 
  @Input()
  private rating:number = 0

  private stars:boolean []

  constructor() { }

  ngOnInit() {
    this.stars = []
    for(let i = 0;i<5;i++){
      this.stars.push(this.rating<i)
    }
  }

}
